#include <iostream>
using namespace std;

void printStr(char *start, char *end, int n)
{
    for (; start != end; start++)
    {
        cout << *start;
    }
    cout << *end;
    if (n < 8)
    {
        for (; n < 8; n++)
            cout << "0";
    }
    cout << endl;
}


int main()
{
    string in;
    while (cin >> in)
    {
        int length = in.length();
        char *tmp = (char *)in.c_str();
        for (; length > 0; length -= 8)
        {
            if (length > 8)
            {

                printStr(tmp, tmp + 7, 8);
                tmp += 8;
            } else {
                printStr(tmp, tmp + length - 1, length);
            }
        }
    }
    return 0;
}